package teamCservlets;
import java.io.Serializable;

public class PersonBean implements java.io.Serializable {
	// Instance variables
	private int		id;
	private String	lastName;
	private String	firstName;	
	private String	middleName;
	private String	emailAddress;
	
	// Constructors
	/** No-arg constructor sets the ID to -1, which indicates that the object is invalid 
	 * (not populated with a person's data).
	 */
	public PersonBean() {
		// Initialize the id to an invalid value.
		id = -1;
	}

	// Getters
	/** 
	* Getter for <code>id</code>
	* @return	The person's id
	*/
	public int getId() {
		return id;
	}

	/** 
	* Getter for <code>lastName</code>
	* @return	The person's last name
	*/
	public String getLastName() {
		return lastName;
	}

	/** 
	* Getter for <code>firstName</code>
	* @return	The person's first name
	*/
	public String getFirstName() {
		return firstName;
	}

	/** 
	* Getter for <code>middleName</code>
	* @return	The person's middle name
	*/
	public String getMiddleName() {
		return middleName;
	}

	/** 
	* Getter for <code>emailAddress</code>
	* @return	The person's email address
	*/
	public String getEmailAddress() {
		return emailAddress;
	}

	/** 
	* Gets the first name and last name, e.g. "John Doe"
	* @return	The person's first and last name
	*/
	public String getFirstAndLastName() {
		return firstName + " " + lastName;
	}

	// Setters
	/** 
	* Setter for <code>id<c/ode>
	* @param	value	The person's id
	*/
	public void setId(final int value) {
		id = value;
	}

	/** 
	* Setter for <code>lastName</code>
	* @param	value	The person's last name
	*/
	public void setLastName(final String value) {
		lastName = value;
	}

	/** 
	* Setter for <code>firstName</code>
	* @param	value	The person's first name
	*/
	public void setFirstName(final String value) {
		firstName = value;
	}

	/** 
	* Setter for <code>middleName</code>
	* @param	value	The person's middle name
	*/
	public void setMiddleName(final String value) {
		middleName = value;
	}

	/** 
	* Setter for <code>emailAddress</code>
	* @param	value	The person's email address
	*/
	public void setEmailAddr(final String value) {
		emailAddress = value;
	}

}
